package com.zhl.media.app.model;

import com.zhl.media.commonsdk.enumeration.MediaCode;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;

import java.io.Serializable;
import org.greenrobot.greendao.annotation.Generated;

@Entity
public class MediaPosition implements Serializable {
    private static final long serialVersionUID = -8940196742313294740L;
    @Id
    private String id;
    private String mediaName;
    private int type;
    private String imgUrl;
    private String schemeName;
    private String schemeId;
    private String alphabetIdentification;
    private int stu;
    private String projectName;
    private String elevatorId;
    private String code;
    private String projectId;

    private String unitId;
    private String installPosition;

    private String buildingId;

    private Long startTime;
    private Long endTime;

    @Transient
    private MediaCode status = MediaCode.CSZ;

    @Generated(hash = 1114804007)
    public MediaPosition(String id, String mediaName, int type, String imgUrl,
            String schemeName, String schemeId, String alphabetIdentification,
            int stu, String projectName, String elevatorId, String code,
            String projectId, String unitId, String installPosition,
            String buildingId, Long startTime, Long endTime) {
        this.id = id;
        this.mediaName = mediaName;
        this.type = type;
        this.imgUrl = imgUrl;
        this.schemeName = schemeName;
        this.schemeId = schemeId;
        this.alphabetIdentification = alphabetIdentification;
        this.stu = stu;
        this.projectName = projectName;
        this.elevatorId = elevatorId;
        this.code = code;
        this.projectId = projectId;
        this.unitId = unitId;
        this.installPosition = installPosition;
        this.buildingId = buildingId;
        this.startTime = startTime;
        this.endTime = endTime;
    }

    @Generated(hash = 2086746877)
    public MediaPosition() {
    }

    public String getAlphabetIdentification() {
        return alphabetIdentification;
    }

    public void setAlphabetIdentification(String alphabetIdentification) {
        this.alphabetIdentification = alphabetIdentification;
    }
    public String getSchemeName() {
        return schemeName;
    }

    public void setSchemeName(String schemeName) {
        this.schemeName = schemeName;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMediaName() {
        return mediaName;
    }

    public void setMediaName(String mediaName) {
        this.mediaName = mediaName;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public MediaCode getStatus() {

        if(getStu() == 1){
            return MediaCode.DTZ;
        }

        if(getStu() == 2){
            return MediaCode.XBH;
        }

        if(getStu() == 3){
            return MediaCode.WCTZ;
        }

        if(getStu() == 4){
            return MediaCode.YTZ;
        }

        if(getStu() == 5){
            return MediaCode.YWC;
        }

        if(getStu() == 6){
            return MediaCode.CSZ;
        }
        if(getStu() == 7){
            return MediaCode.YPZ;
        }
        return status;
    }

    public void setStatus(MediaCode status) {
        this.status = status;
    }

    public int getStu() {
        return stu;
    }

    public void setStu(int stu) {
        this.stu = stu;
    }

    public String getSchemeId() {
        return schemeId;
    }

    public void setSchemeId(String schemeId) {
        this.schemeId = schemeId;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getElevatorId() {
        return elevatorId;
    }

    public void setElevatorId(String elevatorId) {
        this.elevatorId = elevatorId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getProjectId() {
        return this.projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getUnitId() {
        return this.unitId;
    }

    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public String getInstallPosition() {
        return this.installPosition;
    }

    public void setInstallPosition(String installPosition) {
        this.installPosition = installPosition;
    }

    public String getBuildingId() {
        return this.buildingId;
    }

    public void setBuildingId(String buildingId) {
        this.buildingId = buildingId;
    }

    public Long getStartTime() {
        return this.startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return this.endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }
}
